<include file="Public:header" />
<include file="Public:leftside" />

<style>
	.file-item {
		float: left;
		position: relative;
		margin: 0 20px 20px 0;
		padding: 4px;
		background: #000;
	}
	
	.ee_span {
		background: #eee;
		height: 35px;
		display: block;
		line-height: 35px;
		padding-left: 9px;
	}
	.edit_ali{
		float: right;
    	background: #fd0909;
   		color: #fff;
    	padding: 1px 8px;
    	border-radius: 3px;
    }
</style>
<div class="main-content">
	<div class="breadcrumbs breadcrumbs-fixed" id="breadcrumbs">
		<ul class="breadcrumb">
			<li> <i class="icon-home home-icon"></i>
				<a href="#">首页</a>
			</li>
			<li>
				店铺管理
			</li>

		</ul>
	</div>
	<div class="page-content" style="padding: 0;border: none;">

		<form action="{:U('Store/store_Save')}" method="post" class="form form-horizontal" role="form">
			<div class="panel-body" style="padding: 0;border: none;">

				<div class="tab-content" style="padding: 16px 12px 55px 12px;">
					<div class="row panel-body">
						<a href="{:U('Store/info')}" class="btn btn-sm btn-primary">基本信息</a>
						<a href="{:U('Store/template')}" class="btn btn-sm btn-default">模版设置</a>
					</div>
					<section class="panel-default m-b-sm" style="margin:5px 0;">
						<div class="alert alert-info">
							<p>
								<i class="fa fa-hand-o-right m-r-xs"></i><strong>操作提示</strong>
							</p>
							<p class="alert-p m-l-xl"><i class="fa fa-caret-right m-r-xs"></i>该页面可对店铺进行添加编辑修改操作。</p>
						</div>
					</section>
					<div class="tab-pane fade active in" id="apply">
						<section class="panel panel-default">
							<header class="panel-heading font-bold"> 基本信息 </header>
							<div class="panel-body">

								<div class="form-group">
									<label class="col-sm-2 control-label">店铺名称</label>
									<div class="col-md-3">
										<input type="text" class="form-control" name="title" value="{$current.title}">
									</div>
								</div>
								<div class="line line-dashed line-lg pull-in"></div>
								<div class="form-group">
									<label class="col-sm-2 control-label">店铺seo关键词</label>
									<div class="col-md-3">
										<input type="text" class="form-control" name="keywords" value="{$current.keywords}">
									</div>
								</div>
								<div class="line line-dashed line-lg pull-in"></div>
								<div class="form-group">
									<label class="col-sm-2 control-label">店铺seo描述</label>
									<div class="col-md-3">
										<textarea name="description" class="form-control">{$current.description}</textarea>
									</div>
								</div>
								<div class="line line-dashed line-lg pull-in"></div>
								<div class="form-group">
									<label class="col-sm-2 control-label">公司所在地</label>
									<div class="col-md-2">
										<select class="form-control m-b" name="province" id="seleAreaNext" onchange="getProvince(this,'#seleAreaThird')">
											<option value="">请选择省</option>
										</select>
									</div>
									<div class="col-md-2">
										<select class="form-control m-b" name="city" id="seleAreaThird" onchange="getSelCity(this, '#seleAreaFouth')">
											<option value="">请选择市</option>
										</select>
									</div>
									<div class="col-md-2">
										<select class="form-control m-b" name="district" id="seleAreaFouth">
											<option value="-1">请选择区</option>
										</select>
									</div>
								</div>
								<div class="line line-dashed line-lg pull-in"></div>
								<div class="form-group">
									<label class="col-sm-2 control-label">公司详细地址</label>
									<div class="col-md-3">
										<input type="text" class="form-control" id="company_address_detail" name="rel_address" value="{$current.rel_address}">
									</div>
								</div>

								<div class="line line-dashed line-lg pull-in"></div>
								<div class="form-group">
									<label class="col-sm-2 control-label">联系人姓名</label>
									<div class="col-md-2" style="padding-top: 2px">
										<input type="text" class="form-control" name="rel_name" value="{$current.rel_name}">
									</div>
									<label class="col-sm-2 control-label">联系人电话</label>
									<div class="col-md-2" style="padding-top: 2px">
										<input type="text" class="form-control" name="rel_phone" value="{$current.rel_phone}">
									</div>
									<label class="col-sm-2 control-label">电子邮箱</label>
									<div class="col-md-2" style="padding-top: 2px">
										<input type="text" class="form-control" name="rel_email" value="{$current.rel_email}">
									</div>

								</div>
								<div class="line line-dashed line-lg pull-in"></div>
								<div class="form-group">

									<label class="col-sm-2 control-label">身份证</label>
									<div class="col-md-2" style="padding-top: 2px">
										<input type="text" class="form-control" name="id_card" value="{$current.id_card}">
									</div>

								</div>
								<div class="line line-dashed line-lg pull-in"></div>
								<div class="form-group">

									<label class="col-sm-2 control-label">退换货时间</label>
									<div class="col-md-6" style="padding-top: 2px;line-height: 30px; ">
										<input type="number" class="form-control" name="tui_time" value="{$current.tui_time}" style=" margin-right: 5px;width: 50px; float: left;">天,以用户确认收货后计算时间。且为整数
									</div>

								</div>
								<div class="line line-dashed line-lg pull-in"></div>
								<div class="form-group">

									<label class="col-sm-2 control-label">最长消费时间</label>
									<div class="col-md-6" style="padding-top: 2px;line-height: 30px; ">
										<input type="number" class="form-control" name="consume_time" value="{$current.consume_time}" style=" margin-right: 5px;width: 50px; float: left;">天,以用户下单后计算时间。且为整数
									</div>

								</div>
								<div class="line line-dashed line-lg pull-in"></div>
								<div class="form-group">
									<label class="col-sm-2 control-label">是否可以提现</label>
									<div class="col-md-4">
										<label class="switch">
											<input type="checkbox" name="is_tixian" <?php if($current['is_tixian']){ ?>checked="" <?php } ?> >
											<span></span>
										</label>
									</div>
								</div>
								<div class="line line-dashed line-lg pull-in"></div>
								<div class="form-group">
									<label class="col-sm-2 control-label">是否需要发货</label>
									<div class="col-md-4">
										<label class="switch">
											<input type="checkbox" name="is_delivery" <?php if($current['is_delivery']){ ?>checked="" <?php } ?> >
											<span></span>
										</label>
									</div>

								</div>
								<div class="line line-dashed line-lg pull-in"></div>
								<div class="form-group">

									<label class="col-sm-2 control-label">QQ</label>
									<div class="col-md-2" style="padding-top: 2px">
										<input type="text" class="form-control" id="contacts_email" name="shop_qq" value="{$current.shop_qq}">
									</div>
									<label class="col-sm-2 control-label">阿里旺旺</label>
									<div class="col-md-2" style="padding-top: 2px">
										<input type="text" class="form-control" id="contacts_email" name="shop_ww" value="{$current.shop_ww}">
									</div>
								</div>
								<div class="line line-dashed line-lg pull-in"></div>
								<div class="form-group">
								<label class="col-sm-2 control-label">店铺公告</label>
								<div class="col-md-3">
									<textarea name="notice" class="form-control">{$current.notice}</textarea>
								</div>
							    </div>
								<div class="form-group">
									<label class="col-sm-2 control-label">店铺促销信息</label>
									<div class="col-md-3">
										<textarea name="promotion" class="form-control">{$current.promotion}</textarea>
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label">店铺介绍</label>
									<div class="col-md-10">
										<textarea name="pt_jieshao" class="form-control editor">{$current.pt_jieshao}</textarea>
									</div>
								</div>

							</div>
						</section>

						<section class="panel panel-default" id="settlement_info" style="">
							<header class="panel-heading font-bold"> 结算账号信息（支付宝）<a href="{:U('Store/store_edit_ali',array('id'=>$current['id']))}"  class="edit_ali">修改</a> </header>
							<div class="panel-body">
							
								<div class="form-group">
									<label class="col-sm-2 control-label">支付宝帐号</label>
									<div class="col-md-3">
										<span class="ee_span">{$current.ali_number}</span>
										
									</div>
								</div>
								<div class="line line-dashed line-lg pull-in"></div>
								<div class="form-group">
									<label class="col-sm-2 control-label">真实姓名</label>
									<div class="col-md-3">
										<span class="ee_span">{$current.ali_name}</span>
									</div>
								</div>
								<div class="line line-dashed line-lg pull-in"></div>
								<div class="form-group">
									<label class="col-sm-2 control-label">验证手机号</label>
									<div class="col-md-3">
										<span class="ee_span">{$current.ali_phone}</span>
									</div>
								</div>
								
								<div class="line line-dashed line-lg pull-in"></div>
								<div class="form-group">
									<label class="col-sm-2 control-label">平台抽取比率</label>
									<div class="col-md-3">
										<span class="ee_span">{$current['extraction']*100}%</span>
									</div>
								</div>
								
							</div>
						</section>
						<section class="panel panel-default" id="settlement_info" style="">
							<header class="panel-heading font-bold"> 店铺属性 </header>
							<div class="panel-body">
								<div class="form-group">
									<label class="col-sm-2 control-label">所属等级</label>
									<div class="col-md-3">
										<span class="ee_span"><eq name="current.store_type" value="1">直营店铺</eq><eq name="current.store_type" value="2">加盟店铺</eq></span>
									</div>
								</div>
								<div class="line line-dashed line-lg pull-in"></div>
								<div class="form-group">
									<label class="col-sm-2 control-label">描述相符度分数</label>
									<div class="col-md-4">
										<div class="col-md-3">
											<span class="ee_span">{$current.store_desccredit}星</span>
										</div>
										
									</div>
								</div>
								<div class="line line-dashed line-lg pull-in"></div>
								<div class="form-group">
									<label class="col-sm-2 control-label">服务态度分数</label>
									<div class="col-md-4">
										<div class="col-md-3">
											<span class="ee_span">{$current.store_servicecredit}星</span>
										</div>
										
									</div>
								</div>
								<div class="line line-dashed line-lg pull-in"></div>
								<div class="form-group">
									<label class="col-sm-2 control-label">发货速度分数</label>
									<div class="col-md-4">
										<div class="col-md-3">
											<span class="ee_span">{$current.store_deliverycredit}星</span>
										</div>
										
									</div>
								</div>
								
							</div>

						</section>
						<div class="col-sm-4 col-sm-offset-2" style="margin-top: 10px;">
							<button class="formSubmit btn btn-primary btn-sm" id="form" value="保存" ajax="1" type="button">保存</button> &nbsp; &nbsp; &nbsp;
							<button class="btn btn-primary btn-sm btn-danger" value="取消" type="button" onclick="history.back(-1);">取消</button>
						</div>
					</div>
				</div>
			</div>

		</form>
	</div>
	<input type="hidden" id="company_province_id" value="{$current.province}">
	<input type="hidden" id="company_city_id" value="{$current.city}">
	<input type="hidden" id="company_district_id" value="{$current.district}">

	<script>
		//全局变量
		var GV = {
			DIMAUB: "/",
            JS_ROOT: "NewAdmin/js/",
			TOKEN: ""
		};
	</script>
	
	<script type="text/javascript" src="/NewAdmin/js/webuploader/webuploader.js"></script>
	<script type="text/javascript" src="/NewAdmin/js/webuploader/getting-started.js"></script>
	<link rel="stylesheet" href="/NewAdmin/css/webuploader.css" />
	<script src="/NewAdmin/js/wind.js"></script>
	<link href="/NewAdmin/js/artDialog/skins/default.css" rel="stylesheet" />
	<script src="/NewAdmin/js/zhlmy.js"></script>
	<script src="/NewAdmin/js/init_address.js"></script>
	<script type="text/javascript">
		var BASE_URL = '/NewAdmin/js/webuploader/';
		var UPLOAD_SERVER = '{:U("User/uploadify_wb")}';
		var UpFilePathInfo = '<?=$menuCurrent['
		UpFilePathInfo ']?>';
		$(function() {
			if($("#company_province_id").val() == null) {
				provice_id = 0;
			} else {
				provice_id = $("#company_province_id").val();
			}
			if($("#company_city_id").val() == null) {
				city_id = -1;
			} else {
				city_id = $("#company_city_id").val();
			}
			if($("#company_district_id").val() == null) {
				district_id = -1;
			} else {
				district_id = $("#company_district_id").val();
			}

			if(provice_id == 0) {
				initProvince('#seleAreaNext');
			} else {
				load('province', provice_id, 'city', city_id, 'district', district_id);
			}

			$('#uploader img').attr('src', UpFilePathInfo);
			$(':input[name="UpFilePathInfo"]').val(UpFilePathInfo);
			$("#uploader").setUploader(null, {
				uploadImgType: 'normal',
				thumb: {
					height: 102
				}
			});
		});
		
		
	</script>
	<include file="Public:footer" />